home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / tsql / doc / tsql.mail / 000070_@ICINECA.CINECA…s64.cineca.it _Tue Apr 6 18:44:49 1993.msg < prev    next >
Internet Message Format  |  1996-01-31  |  8KB

  1. Received: from icineca.cineca.it by optima.cs.arizona.edu (5.65c/15) via SMTP
  2.     id AA22404; Tue, 6 Apr 1993 09:43:38 MST
  3. Received: from deis64.cineca.it by ICINECA.CINECA.IT (IBM VM SMTP V2R2)
  4.    with TCP; Tue, 06 Apr 93 18:43:19 SET
  5. Received: from [137.204.57.79] (deis79) by deis64.cineca.it (4.1/SMI-4.1)
  6.     id AA13038; Tue, 6 Apr 93 18:45:27 +0200
  7. Date: Tue, 6 Apr 93 18:44:49 +0100
  8. From: (Fabio Grandi) <fabio@deis64.cineca.it>
  9. Message-Id: <67495.fabio@deis64.cineca.it>
  10. To: tsql@cs.arizona.edu
  11. Subject: Valid/Transaction times orthogonality
  12.  
  13. The following message regards valid and transaction time
  14. orthogonality in temporal queries.
  15. It continues a correspondence started with Shashi Gadia which
  16. - I agree - may be of general interest.
  17.  
  18. =============================================================================
  19.  
  20. My original questions arose from Gadia and Sunil's email on March 31 (EM1),
  21. which was a contribution to the TSQL benchmark discussion
  22. (as well, such questions may be part of the discussion
  23. around a next phase of the benchmark, when transaction-time
  24. queries are going to be included).
  25.  
  26. First of all, as far as the Gadia's reply on April 5 (EM2)
  27. is concernded, I completely agree with his view.
  28. It also helped to clarify some points of EM1 which
  29. seemed to me a little questionable.
  30.  
  31. I make no doubt that:
  32.  
  33.  1)  PURE valid time query: "when did John work in toys"
  34.      (i.e. valid time query in a valid-time database)
  35.  
  36. and:
  37.  
  38.  2)  PURE transaction time query: "when did John work in toys"
  39.      (i.e. transaction time query in a transaction-time database)
  40.  
  41. are orthogonal and are to be expressed in a similar way
  42. in a (mono)temporal query language. Consequently, we can also accept
  43. a common English formulation for them. Only the (*implied*)
  44. time dimension varies.
  45.  
  46. In a bitemporal database, I also share the view that 
  47. the counterpart of (1) and (2) is:
  48.  
  49.  3)  PURE bitemporal query: "when did John work in toys"
  50.      (i.e. bitemporal query in a bitemporal database)
  51.  
  52. Although (3) can have the same expression as (1) and (2)
  53. in a (bi)temporal query language (provided that bitemporal
  54. rather than monotemporal timestamps are retrieved),
  55. a little more questionable thing is the most "natural" meaning
  56. of its English formulation in this framework.
  57.  
  58. Well, my initial observations addressed to Gadia arose from the examples
  59. contained in section "transaction time queries" of EM1, which
  60. seemed to me somewhat confusing.
  61.  
  62. EM1 suggested the *addition* of transaction time queries
  63. to the tsql benchmark, based so far on a valid-time model,
  64. so I assumed the scope of EM1 to be bitemporal and, thus,
  65. I understood a bitemporal context as I was reading the examples:
  66.  
  67.   4) valid time query: "when did John work in toys"
  68.      (valid time query in a bitemporal database)
  69.  
  70.   5) transaction time query: "when was John believed to have worked in toys"
  71.      (transaction time query in a bitemporal database (?))
  72.  
  73. In my opinion, IN A BITEMPORAL CONTEXT, there's not a clear orthogonality
  74. between (4) and (5), such that their corresponding sql-queries are identical.
  75. For instance, it can be noticed that (2) and (4) have the same English
  76. formulation though they are supposed to represent different kinds of queries.
  77.  
  78. I feel that the most "natural" meaning of the question word "when"
  79. - concerning some "fact" and not some "belief" -
  80. in a bitemporal context is to denote a historical inquiry,
  81. along valid time, in a database which is kept up-to-date
  82. by a human being (and not by a wizzard) as best as he can (now).
  83. Hence, I feel that (4) usually implies in a "natural" way the
  84. transaction time qualifier *as of now* and its more explicit meaning is:
  85.  
  86.  4a) retrieve the valid timestamps of the data
  87.      telling that John worked in toys
  88.      from the database restricted to the transaction timepoint "now"
  89.  
  90. The transaction-time counterpart of (4a) could be as well:
  91.  
  92.  5a) retrieve the transaction timestamps of the data
  93.      telling that John worked in toys
  94.      from the database restricted to the valid timepoint "now"
  95.  
  96. which is orthogonal to (4a) but rather different, I believe, from (5).
  97.  
  98. On the other hand, the English query "when was John believed
  99. to have worked in toys" may be something "more" than a simple
  100. transaction time query in a bitemporal database.
  101. I think it presents some very interesting semantic issues
  102. which should be taken into account in future versions of the tsql benchmark.
  103.  
  104. First, if we say "John worked in toys" in a bitemporal context,
  105. we likely mean he did it [in reality] in some valid time span.
  106. Second, if we say "when was John believed" in a bitemporal context,
  107. we likely mean he was believed [according to the information in the DB]
  108. in some transaction time span, which is the target of our query.
  109. Therefore, combining the two things, our query seems to look for
  110. the transaction time spans in which it was stored in the database
  111. that John worked in toys in some valid time span. Since such a valid
  112. time span is not *explicit* in the query, we have to assume some kind
  113. of *default* to fully map our query onto bitemporal data.
  114. I would suggest that a "natural" default for the valid time span
  115. could be in this case the same time span used for transaction time.
  116.  
  117. If we want to specify a *different* valid time span, we have to express
  118. it explicitly, as in the query "when was John believed to have worked
  119. in toys in 1990", which could be answered as:
  120.  
  121.   pi                 ( sigma                                       ( R ) )
  122.     Transaction time         Name=John, Dept=toys, Valid time=1990 
  123.  
  124. if R is the bitemporal relation containing John's and departments' data.
  125.  
  126. Assuming the suggested default ("coherent" values of transaction and
  127. valid time), the query can be detailed as:
  128.  
  129.  5b) retrieve all the (transaction/valid) time points T such that
  130.      John worked in toys
  131.      from the data valid at valid time T
  132.      from the database as of transaction time T
  133.  
  134. In this case, the qualifying timestamps must be retrieved
  135. from the data laying along the *diagonal* of the time quadrant
  136. whose axes are transaction and valid time.
  137.  
  138. This kind of retrieval should be supported by a temporal query language,
  139. since its semantics seems to be interesting from an application point
  140. of view.
  141.  
  142. Let us consider, for instance, a database storing employees' data
  143. including an attibute "Qualification" on which the salary value depends.
  144. Let us make the following (simplified) assumptions:
  145.  
  146.  a) salaries are payed monthly, in advance, on the 1st of each month;
  147.  
  148.  b) for each employee, the value to be payed on the 1st of "M" 
  149.     is evaluated as a function of the attribute value Employee.Qualification
  150.     valid on the 1st of "M" as of the 1st of "M",
  151.     which is the correct value for month "M" as best known on the 1st of "M"
  152.     (no wizzard can forecast future retroactive updates);
  153.  
  154.  c) due to a mistake of a terminal operator, a wrong value, say "Q2",
  155.     of the John's Qualification was stored in the database;
  156.  
  157.  d) some time later, John (or someone else) noticed the mistake
  158.     and a retroactive modification was issued to correct the
  159.     Qualification value;
  160.  
  161.  e) the accounting department is then informed that John's salaries
  162.     must be audited;
  163.  
  164.  f) the accounting department has to know for which months
  165.     the John's salary must be recomputed; this can be answered
  166.     by the query:
  167.  
  168.     "when John's Qualification was believed to have been Q2"
  169.  
  170. This query can be detailed as:
  171.  
  172.      retrieve all the months "M" such that
  173.      John's Qualification=Q2 
  174.      from the data valid on the 1st of "M"
  175.      from the database as of the 1st of "M"
  176.  
  177. As a matter of fact, it should be noticed that
  178. the Qualification value Q2 (valid on and as of the 1st of "M")
  179. was used on the 1st of "M" to compute the wrong salary amount
  180. which was *actually* payed to John, according to (b).
  181.  
  182.  
  183. I hope that this example (and my suggestions)
  184. would come out more clear than obscure.
  185.  
  186. I would greatly appreciate any comments on the topic.
  187.  
  188. Sincerely,
  189.     Fabio Grandi.